import http from "@/api/config/http";
import { IQuery } from "@/interface/IAxios";

export const listDictType = (query: IQuery) => {
  return http.request({
    url: `/system/dict/type/list`,
    method: "get",
    params: query
  });
};

export const addDictType = (data: any) => {
  return http.request({
    url: `/system/dict/type`,
    method: "post",
    data
  });
};

export const updateDictType = (data: any) => {
  return http.request({
    url: `/system/dict/type`,
    method: "put",
    data
  });
};

export const delDictType = (id: string) => {
  return http.request({
    url: `/system/dict/type/${id}`,
    method: "delete"
  });
};

export const getDictType = (id: string) => {
  return http.request({
    url: `/system/dict/type/${id}`,
    method: "get"
  });
};
